<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:ui="http://java.sun.com/jsf/facelets" 
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:f="http://java.sun.com/jsf/core">
	<h:body>
		<ui:composition>
			<h:form id="passwordGenerator" onsubmit="return false">
				<div>
					<h:outputLabel for="length" value="#{i18n['entry.length']}" />
					<h:inputText id="length" value="#{generatorBean.length}" styleClass="number" autocomplete="off" maxlength="2" onchange="$('[id=\'passwordGenerator:generatedPassword\']').val(generatePassword()); $('[id=\'passwordGenerator:generatedPassword\']').trigger('change');" />
				</div>
				<div style="margin-top:20px">
					<h:outputLabel for="generatedPassword" value="#{i18n['generic.password']}" />
					<h:inputSecret id="generatedPassword" styleClass="switchVisibility" autocomplete="off" />
				</div>
				<div>
					<h:outputLabel value="Strength" />
					<h:outputText id="passwordStrength" value="Unknown" styleClass="outputText" />
				</div>
				<div>
					<h:selectBooleanCheckbox id="upperCase" value="#{generatorBean.upperCase}" onchange="$('[id=\'passwordGenerator:generatedPassword\']').val(generatePassword()); $('[id=\'passwordGenerator:generatedPassword\']').trigger('change');" />
					<h:outputLabel for="upperCase" value="#{i18n['entry.upper']}" styleClass="checkboxLabel" />
				</div>
				<div>
					<h:selectBooleanCheckbox id="lowerCase" value="#{generatorBean.lowerCase}" onchange="$('[id=\'passwordGenerator:generatedPassword\']').val(generatePassword()); $('[id=\'passwordGenerator:generatedPassword\']').trigger('change');" />
					<h:outputLabel for="lowerCase" value="#{i18n['entry.lower']}" styleClass="checkboxLabel" />
				</div>
				<div>
					<h:selectBooleanCheckbox id="digits" value="#{generatorBean.digits}" onchange="$('[id=\'passwordGenerator:generatedPassword\']').val(generatePassword()); $('[id=\'passwordGenerator:generatedPassword\']').trigger('change');" />
					<h:outputLabel for="digits" value="#{i18n['entry.digits']}" styleClass="checkboxLabel" />
				</div>
				<div>
					<h:selectBooleanCheckbox id="minus" value="#{generatorBean.minus}" onchange="$('[id=\'passwordGenerator:generatedPassword\']').val(generatePassword()); $('[id=\'passwordGenerator:generatedPassword\']').trigger('change');" />
					<h:outputLabel for="minus" value="#{i18n['entry.minus']}" styleClass="checkboxLabel" />
				</div>
				<div>
					<h:selectBooleanCheckbox id="underline" value="#{generatorBean.underline}" onchange="$('[id=\'passwordGenerator:generatedPassword\']').val(generatePassword()); $('[id=\'passwordGenerator:generatedPassword\']').trigger('change');" />
					<h:outputLabel for="underline" value="#{i18n['entry.underline']}" styleClass="checkboxLabel" />
				</div>
				<div>
					<h:selectBooleanCheckbox id="space" value="#{generatorBean.space}" onchange="$('[id=\'passwordGenerator:generatedPassword\']').val(generatePassword()); $('[id=\'passwordGenerator:generatedPassword\']').trigger('change');" />
					<h:outputLabel for="space" value="#{i18n['entry.space']}" styleClass="checkboxLabel" />
				</div>
				<div>
					<h:selectBooleanCheckbox id="special" value="#{generatorBean.special}" onchange="$('[id=\'passwordGenerator:generatedPassword\']').val(generatePassword()); $('[id=\'passwordGenerator:generatedPassword\']').trigger('change');" />
					<h:outputLabel for="special" value="#{i18n['entry.special']}" styleClass="checkboxLabel" />
				</div>
				<div>
					<h:selectBooleanCheckbox id="brackets" value="#{generatorBean.brackets}" onchange="$('[id=\'passwordGenerator:generatedPassword\']').val(generatePassword()); $('[id=\'passwordGenerator:generatedPassword\']').trigger('change');" />
					<h:outputLabel for="brackets" value="#{i18n['entry.brackets']}" styleClass="checkboxLabel" />
				</div>
				<div>
					<h:selectBooleanCheckbox id="highAnsi" value="#{generatorBean.highAnsi}" onchange="$('[id=\'passwordGenerator:generatedPassword\']').val(generatePassword()); $('[id=\'passwordGenerator:generatedPassword\']').trigger('change');" />
					<h:outputLabel for="highAnsi" value="#{i18n['entry.high']}" styleClass="checkboxLabel" />
				</div>
				<div class="buttons">
					<h:commandButton type="submit" value="#{i18n['entry.accept']}" onclick="acceptGeneratedPassword()" />
					<input type="button" value="#{i18n['entry.regenerate']}" onclick="$('[id=\'passwordGenerator:generatedPassword\']').val(generatePassword()); $('[id=\'passwordGenerator:generatedPassword\']').trigger('change');" />
					<input type="button" value="#{i18n['generic.cancel']}" onclick="scrollMultiPartContent('partAddEntry')" />
				</div>
			</h:form>
		</ui:composition>
	</h:body>
</html>